package com.ideapse.springcloud.client;

import com.ideapse.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * @author LuoJianWei
 * @email LuoJianWei_98@foxmail.com
 * @date 2024/4/28 11:35
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
public interface DeptConsumerFeignClient {

    @PostMapping("/dept")
    boolean addDept(@RequestBody Dept dept);

    @GetMapping("/dept/{id}")
    Dept getDeptById(@PathVariable(value = "id") Long id);

    @GetMapping("/dept/all")
    List<Dept> getAll();

}
